﻿@using Kaiser.Cubic.Service
@{
    var service = new CubicServiceClient();
    var productCategories = service.GetProductCateogrys("1");
}
@foreach (var item in productCategories)
{
    <div class="left_1">
        <span>
            <img src="/images/index_60.png" /></span><a href="@Url.Action("ProductList", "Product")?categoryId=@item.Id">@item.CategoryName</a>
    </div>
    <div class="left_2">

        <ul>
            @foreach (var zl in item.Categories)
            {
                <li><span>
            
                        <img src="/images/index_60.png" />
                    </span>
                        @if (!string.IsNullOrWhiteSpace(Request["categoryId"]) && Request["categoryId"] == zl.Id.ToString())
                        {
                            <a style="color: black" href="@Url.Action("ProductList", "Product")?categoryId=@zl.Id">@zl.CategoryName</a>
                        }
                        else
                        {
                             <a href="@Url.Action("ProductList", "Product")?categoryId=@zl.Id">@zl.CategoryName</a>
                        }
                    </li>
      
            }

        </ul>
    </div>
}

